<template>
    <div>
        <el-row :gutter="30">
            <el-col :offset="7" :span="10">
                <div class="form-content">
                    <el-form ref="form" :model="form" label-width="80px">
                         <el-form-item label="父级分类">
    <el-select v-model="form.region" placeholder="父级名称">
      <el-option label="节日鲜花" value="shanghai"></el-option>
      <el-option label="爱情鲜花" value="beijing"></el-option>
    </el-select>
  </el-form-item>
  <el-form-item label="分类名称">
    <el-input v-model="form.name"></el-input>
  </el-form-item>
 <el-form-item label="排序">
    <el-input v-model="form.name"></el-input>
  </el-form-item>
  <el-form-item label="分类图标">
   <el-input v-model="form.name"></el-input>
   <el-upload
  class="upload-demo"
  action="https://jsonplaceholder.typicode.com/posts/"
  :on-preview="handlePreview"
  :on-remove="handleRemove"
  :before-remove="beforeRemove"
  multiple
  :limit="3"
  :on-exceed="handleExceed"
  :file-list="fileList">
  <el-button size="small" type="primary">点击上传</el-button>
</el-upload>
  </el-form-item>
  <el-form-item label="分类链接">
   <el-input v-model="form.name"></el-input>
  </el-form-item>
  <el-form-item label="是否显示">
    <el-radio-group v-model="form.resource">
      <el-radio label="是"></el-radio>
      <el-radio label="否"></el-radio>
    </el-radio-group>
  </el-form-item>
  <el-form-item>
    <el-button type="primary" @click="onSubmit">保存</el-button>
    <el-button>取消</el-button>
  </el-form-item>
</el-form>
                </div>
            </el-col>
        </el-row>
    </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: ""
      }
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    }
  }
};
</script>


<style lang="less" scoped>
.form-content {
  padding: 30px;
  background: #ffff;
  height: 70vh;
  border: 1px solid #bdbdbd;
  border-radius: 10px;
}
</style>

